import { BasicColumn, FormSchema } from '/@/components/Table';
import { render } from '/@/utils/common/renderUtils';
import { DescItem } from '/@/components/Description/index';
import { useI18n } from '/@/hooks/web/useI18n';
const { t } = useI18n('');

export const columns: BasicColumn[] = [
  {
    title: t('协议标题'),
    dataIndex: 'title',
    width: 100,
  },
  {
    title: t('协议编码'),
    dataIndex: 'code',
    width: 100,
  },
  {
    title: t('创建者'),
    dataIndex: 'createdBy',
    width: 150,
    align: 'center',
  },
  {
    title: t('更新时间'),
    dataIndex: 'updatedAt',
    width: 150,
    align: 'center',
  }
];

export const searchFormSchema: FormSchema[] = [
  {
    label: t(''),
    field: 'keyword',
    component: 'Input',
    componentProps: {
      placeholder: '协议标题/编码'
    }
  },
];



export const inputFormSchemas: FormSchema[] = [
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
  {
    label: t('协议标题'),
    required: true,
    field: 'title',
    component: 'Input',
    componentProps: {
      maxlength: 255,
    },
  },
  {
    label: t('协议编码'),
    required: false,
    field: 'code',
    component: 'Input',
    componentProps: {
      maxlength: 255,
    },

  },
  {
    label: t('备注'),
    field: 'remark',
    required: false,
    component: 'InputTextArea',
    componentProps: {
      maxlength: 500,
      autoSize: {
        minRows: 3,
        maxRows: 8
      }
    },
    colProps: { lg: 24, md: 24 },
  },
  {
    label: t('协议内容'),
    required: true,
    field: 'content',
    component: 'MyRichTextEditor',
    componentProps: {
      maxlength: 50000,
    },

  }
];
